import turtle as t
print("请输入画板尺寸")
print("宽度：")
Width=int(input())
print("高度：")
Height=int(input())
t.setup(width=Width,height=Height)
command = []
while True: 
    command.clear()
    command=input().split()
    if command[0]=="EXIT":
        exit()
    if command[0]=="FD":
        t.forward(int(command[1]))
        continue
    if command[0]=="BK":
        t.backward(int(command[1]))
        continue
    if command[0]=="LT":
        t.left(int(command[1]))
        continue
    if command[0]=="RT":
        t.right(int(command[1]))
        continue
    if command[0]=="GOTO":
        t.goto(int(command[1]),int(command[2]))
        continue
    if command[0]=="PU":
        t.penup()
        continue
    if command[0]=="PD":
        t.pendown()
        continue
    if command[0]=="CIR":
        t.circle(int(command[1]))
        continue
    if command[0]=="COLOR":
        t.colormode(255)
        t.pencolor(int(command[1]),int(command[2]),int(command[3]))
        continue
    print("Syntax Err")
    